package com.migo.utils;


import com.migo.entity.Mail;

import javax.mail.internet.InternetAddress;
import java.util.List;

/**
 * Created by paik on 2017/12/11.
 */
public class MailUtilRunable implements Runnable {
    private Mail mail;
    private List<InternetAddress> list;

    public MailUtilRunable(Mail mail, List<InternetAddress> list) {
        this.mail = mail;
        this.list = list;
    }

    public Mail getMail() {
        return mail;
    }

    public void setMail(Mail mail) {
        this.mail = mail;
    }

    public List<InternetAddress> getList() {
        return list;
    }

    public void setList(List<InternetAddress> list) {
        this.list = list;
    }

    @Override
    public void run() {
        MailUtil.send(mail, list);
    }
}
